<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <h:body>
        <ui:composition template="templateGeneral.xhtml">
            <ui:define name="title">Publikacije</ui:define>
            <ui:define name="center">

                <h:form>
                    <p:dataTable id="pubTable" var="pub" value="#{publikacija.publikacije}" style="margin: 20px"
                                 filteredValue="#{publikacija.filtered}">  
                        <f:facet name="header">  
                            Publikacije  
                        </f:facet>  

                        <p:column sortBy="naziv" filterBy="naziv" filterMatchMode="contains" headerText="Naziv">  
                            <h:outputText value="#{pub.naziv}" />  
                        </p:column> 

                        <p:column sortBy="autor" filterBy="autor" filterMatchMode="contains" headerText="Autor">  
                            <h:outputText value="#{pub.autor}" />  
                        </p:column>  

                        <p:column headerText="Opis">  
                            <h:outputText value="#{pub.opis}" />  
                        </p:column>  

                        <p:column  headerText="Skini">  
                            <h:outputText value="#{pub.data}" />  
                        </p:column>  

                    </p:dataTable>  
                </h:form>
            </ui:define>
        </ui:composition>

    </h:body>
</html>

